package com.cimr.comm.service;

import com.cimr.comm.po.Permission;

import java.util.List;
import java.util.Set;

/**
 * Created by liqi on 2017/8/2.
 */
public interface PermissionService {

    //根据用户ID获取权限的Set集合
    Set<String> findPermissionByUserId(String userId);

    int insertPermission(String id,
                          String permissionKey,
                          String permissionName,
                          String permissionType,
                          String parentId,
                          Integer level,
                          String comment,
                          Float orderId,
                          String target,
                          String href);

    int updatePermission(String id,
                                String permissionKey,
                                String permissionName,
                                String permissionType,
                                String parentId,
                                Integer level,
                                String comment,
                                Float orderId,
                                String target,
                                String href);

    int deletePermissionById(String id);

    List<Permission> getPermissionListByRoleId(String roleId);

    List<Permission> getPermissionListByUserId(String userId);

    /**
     * 按数据id批量删除权限数据
     * @param ids
     * @return
     */
    int deletePermissionsByIds(String[] ids);

    int deleteMenuListByParentId(String parentId);
}
